<script>
import {getTodaySalesAmount} from "@/api/sale/sale";

export default{
  data() {
    return{
      todayAmount:0
    }
  },
  mounted() {
    this.fetchStatistics();
  },
  methods:{
    back(){
      this.$router.push('/')
    },
    async fetchStatistics() {
      const orderResponse = await getTodaySalesAmount();
      this.todayAmount = orderResponse.data || 0;
    }
  }
}


</script>

<template>
  <el-card class="box-contenier">

    <div class="title">
      <div>
        <span>交易额数据:</span>
        <strong>{{ todayAmount }}</strong>

      </div>
    </div>
  </el-card>
</template>

<style scoped lang="scss">
.box-contenier{
  margin: 10px 10px;

  .title{
    padding:10px 0 10px 0 ;
  }
}

</style>
